/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.csm.sim2k11.entities;

/**
 *
 * @author santi
 */
public class Client {

    private int ID, clientsQuantiy;
    private double startWaiting, endWaiting, startService, endService;

    public Client(int ID, int quantity) {
        clientsQuantiy = quantity;
        startWaiting = endWaiting = startService = endService = 0;
    }

    /**
     * @return the clientsQuantiy
     */
    public int getClientsQuantiy() {
        return clientsQuantiy;
    }

    /**
     * @return the startWaiting
     */
    public double getStartWaiting() {
        return startWaiting;
    }

    /**
     * @param startWaiting the startWaiting to set
     */
    public void setStartWaiting(double startWaiting) {
        this.startWaiting = startWaiting;
    }

    /**
     * @return the endWaiting
     */
    public double getEndWaiting() {
        return endWaiting;
    }

    /**
     * @param endWaiting the endWaiting to set
     */
    public void setEndWaiting(double endWaiting) {
        this.endWaiting = endWaiting;
    }

    /**
     * @return the startService
     */
    public double getStartService() {
        return startService;
    }

    /**
     * @param startService the startService to set
     */
    public void setStartService(double startService) {
        this.startService = startService;
    }

    /**
     * @return the endService
     */
    public double getEndService() {
        return endService;
    }

    /**
     * @param endService the endService to set
     */
    public void setEndService(double endService) {
        this.endService = endService;
    }

    /**
     * Calculates the time passed since the client starts waiting till
     * it was attended.
     * @return double time.
     */
    public double getWaitingTime() {
        return endWaiting - startWaiting;
    }

    /**
     * Calculates the time passed since the client was attended till it 
     * leaves the restaurant.
     * @return double time.
     */
    public double getServiceTime() {
        return endService - startService;
    }

    public double getClientTotalTime() {
        return getWaitingTime() + getServiceTime();
    }

    /**
     * @return the ID
     */
    public int getID() {
        return ID;
    }

    /**
     * @param ID the ID to set
     */
    public void setID(int ID) {
        this.ID = ID;
    }
}
